package com.kangfu.api.service;

import com.kangfu.db.domain.entity.HuaweiHealthBluetoohDetail;
import com.kangfu.db.model.bo.huawei.TokenInfoBo;
import com.kangfu.db.model.request.ReceviceDataRequest;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;

public interface IHuaweiService {

    public String buildAuthorizeUrl(int userId, String token);

    public void getAccessTokenByCode(String code, int userId);

    public String getAccessTokenFromCache(int userId);

    public boolean unAuthorize(int userId);

    public TokenInfoBo getAccessTokenInfo(String accessToken);

    public int checkHealthKitPrivacy(int userId);

    public HashMap<String, Object> getDetailHealthData(int userId, int type, LocalDateTime dateTime, int forceRefresh);

    public HashMap<String, Object> getStatHealthData(int userId, LocalDateTime dateTime, int forceRefresh);

    public HashMap<String, Object> getDailyHealthDataList(int userId, int type, LocalDate start, LocalDate end, int forceRefresh);

    public HashMap<String, Object> getDailyHealthDataListFromBluetooth(int userId, int type, LocalDate start, LocalDate end, int forceRefresh);

    public HashMap<String, Object> getMinutelyHealthDataList(int userId, int type, LocalDateTime localDateTime, int forceRefresh);

    public HashMap<String, Object> getMinutelyHealthDataListFromBluetooth(int userId, int type, LocalDateTime localDateTime, int forceRefresh);

    public void receiveData(int userId, List<ReceviceDataRequest> list);

    public void handleBluetoothData(int userId, List<ReceviceDataRequest> list);

    public HuaweiHealthBluetoohDetail getSportData(int userId, String startTimeString, String endTimeString, String val);

}
